import request from '@/utils/request'

// 用户登录
export function login(data) {
  return request({
    url: '/user/auth/login',
    method: 'post',
    data: data
  })
}

// 用户注册
export function register(data) {
  return request({
    url: '/user/auth/register',
    method: 'post',
    data: data
  })
}

// 获取用户信息
export function getInfo() {
  return request({
    url: '/user/auth/getInfo',
    method: 'get'
  })
}

// 退出登录
export function logout() {
  return request({
    url: '/user/auth/logout',
    method: 'post'
  })
}

// 获取验证码
export function getCodeImg() {
  return request({
    url: '/captchaImage',
    method: 'get',
    timeout: 20000
  })
} 